package com.whity.towerdefense.view;

import java.util.Vector;

import com.whity.towerdefense.R;
import com.whity.towerdefense.TowerDefenseActivity;
import com.whity.towerdefense.model.GameModel;
import com.whity.towerdefense.model.Level;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.Button;
import android.widget.SlidingDrawer;
import android.widget.SlidingDrawer.OnDrawerCloseListener;
import android.widget.SlidingDrawer.OnDrawerOpenListener;

public class ActionPhaseView extends GLSurfaceView
{
	// =============================================================
	// Private attributs :
	
	private static final String 		TAG = "com.djm.test03.view";
	
	private static ActionPhaseRenderer 	m_APRenderer;
	private static Level				m_Level;

	// =============================================================
	// Public functions :
	
	public ActionPhaseView(Context p_Context, AttributeSet p_Attrs)
	{
		super(p_Context, p_Attrs);
		m_APRenderer = new ActionPhaseRenderer();
		m_Level = GameModel.LEVEL;
		setRenderer(m_APRenderer);
		m_APRenderer.m_GraphicElts.add(m_Level.GetMap());
	}
	
	public void OnPause()
	{
		super.onPause();
	}
	
	public void OnResume()
	{
		super.onResume();
	}

	public boolean onTouchEvent(MotionEvent p_Evt)
	{
		GameView.GAME_CONTROLER.onTouch(this, p_Evt);

		return true;
	}
	
	public static void AddGraphic(GraphicDrawable p_Elt)
	{
		m_APRenderer.m_GraphicElts.add(p_Elt);
	}
	
	// =============================================================
}
